<%@ page language="java" pageEncoding="UTF-8"%>
<div class="container">
	<ol class="breadcrumb">
		<li>
			<a href="${Constants.HOST}${Constants.ROOT_PATH}">${Constants.APP_NAME}</a>
		</li>
		<li>
			<a href="#/openApi">OpenApi</a>
		</li>
	</ol>
	<div class="row">
        <div class="col-sm-3 col-md-3">
            <div class="panel-group">
                <div class="panel panel-default" ng-repeat="api in apis">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" href="javascript:void(0);">
                            	{{api.name}} <span class="badge pull-right">{{api.children.length}}</span></a>
                        </h4>
                    </div>
                    <div class="panel-collapse collapse in">
                    	<div class="panel-body">
                            <table class="table">
                                <tbody>
	                                <tr ng-repeat="children in api.children">
	                                    <td>
	                                       <a style="color: black;cursor:pointer;" ng-click="showOne(children);">{{children.name}}</a>
										</td>
	                                </tr>
                            	</tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-9 col-md-9">
        	<div ng-show="select==null">
				<div class="jumbotron">
					<h2>
						${Constants.APP_NAME}开放平台
					</h2>
				</div>
        	</div>
        	
        	<div ng-show="select!=null">
        		<h2>
        			{{select.name}}
        		</h2>
        		<hr/>
        		<div>
        		
					<div class="panel panel-default">
						<div class="panel-heading">
							{{select.url}}
						</div>
						<div class="panel-body">
							<source model="select.explain"></source>
						</div>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							URL
						</div>
						<div class="panel-body">
							{{select.url}}
						</div>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							支持格式
						</div>
						<div class="panel-body">
							{{select.format}}
						</div>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							HTTP请求方式
						</div>
						<div class="panel-body">
							{{select.request_type}}
						</div>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							请求参数
						</div>
						<div class="panel-body">
							<source model="select.parameter"></source>
						</div>
					</div>
					
					<div class="panel panel-default">
						<div class="panel-heading">
							返回结果
						</div>
						<div class="panel-body">
							<source model="select.result"></source>
						</div>
					</div>
					
        		</div>
        	</div>
        </div>
    </div>
</div>